define(function (require, exports, module) {
    'use strict';
    var base = require('js/utils/model'),
        _ = require('underscore');

    var MissedVips = base.Model.extend({
        defaults: {
            uid: '',
            nick_name: '',
            phone: '',
            chn: '',
            active_days: 0,
            created_time: '',
            updated_time: '',
            lost_days: 3,
            rank: 1,
            recharge_amount: 0,
            pay_count: 0,
            win_count: 0,
            win_amount: 0,
            status: '',
            type: 1,
            user_type: 0,
            back_recharge: 0,
            used_coupon: 0,
            created_at: '',
            updated_at: ''
        },
        urlRoot: "/admin/stats/vips/missed/",
    });
    var MissedVipsCollection = base.Collection.extend({
        model: MissedVips,
        url: "/admin/stats/vips/missed/",
    });
    var BackVips = base.Model.extend({
        defaults: {
            call_at: '',
            calc_at: '',
            lost_days: 3,
            total_count: 0,
            back_count: 0,
            back_rate: 0,
            recharge_count: 0,
            recharge_amount: 0,
            recharge_rate: 0,
            recharge_arpu: 0,
            win_count: 0,
            win_amount: 0,
            win_rate: 0,
            coupon_amount: 0,
            pay_count: 0
        },
        urlRoot: "/admin/stats/vips/back/",
        parse: function (response) {
            if (response.data) {
                return response.data;
            }
            return response;
        }
    });
    var BackVipsCollection = base.Collection.extend({
        model: MissedVips,
        url: "/admin/stats/vips/back/",
    });
    var ActiveVips = base.Model.extend({
        defaults: {
            uid: '',
            type: '',
            pay_amount: 3,
            win_count: 0,
            win_amount: 0,
            created_at: '',
            updated_at: '',
            nick_name: 0,
            phone: '',
            created_time: '',
            visit_time: 0,
            add_time: 0,
        },
        urlRoot: "/admin/stats/vips/active/",
    });
    var ActiveVipsCollection = base.Collection.extend({
        model: ActiveVips,
        url: "/admin/stats/vips/active/",
    });
    module.exports = {
        MissedVips: MissedVips,
        MissedVipsCollection: MissedVipsCollection,
        BackVips: BackVips,
        BackVipsCollection: BackVipsCollection,
        ActiveVips: ActiveVips,
        ActiveVipsCollection: ActiveVipsCollection,
    }

});